home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_07_08 / v7n8072a.txt < prev    next >
Text File  |  1989-10-01  |  494b  |  28 lines

  1.  
  2.  
  3. *****Listing 3*****
  4.  
  5.      void someproc(p)
  6.          something * p;
  7.          {
  8.      #if DEBUG
  9.           if(!p)
  10.              {
  11.               if(report_null_pointer("someproc: p"))
  12.                   return;
  13.              }
  14.      #endif
  15.           }
  16.  
  17. and use a target procedure which consists of
  18.  
  19.      short report_null_pointer(where)
  20.         char * where;
  21.         {
  22.          fprintf(stderr,"NULL POINTER: %s\n",where);
  23.          return stop(where);
  24.         }
  25.  
  26. **********
  27.  
  28.